﻿using CommunityToolkit.Mvvm.DependencyInjection;
using System.Windows.Input;
using TiaoTiaoCode.QuartzUI.ViewModels;

namespace TiaoTiaoCode.QuartzUI.Views
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow //: Window
    {
        public MainViewModel ViewModel => (MainViewModel)DataContext;
        public MainWindow()
        {
            InitializeComponent();

            nonArea.MouseMove += (s, e) =>
            {
                if (e.LeftButton == MouseButtonState.Pressed)
                    DragMove();
            };

            DataContext = Ioc.Default.GetRequiredService<MainViewModel>();
        }
    }
}
